-- GENERATED SPELL FOR [Ashtongue Defender] --


function spell0_23216(pUnit, Event) --@Debilitating Strike,n/a--
pUnit:FullCastSpellOnTarget(41178,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23216', 643, 1)
end

function spell1_23216(pUnit, Event) --@Heroic Strike,n/a--
pUnit:FullCastSpellOnTarget(41975,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23216', 572, 1)
end

function spell2_23216(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(41180,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23216', 3300, 1)
end

function Sorts_23216(pUnit, Event)
local choix_sorts_23216 = math.random(0, 2)
if choix_sorts_23216 == 0 then
pUnit:RegisterEvent('spell0_23216', 1, 1)
end
if choix_sorts_23216 == 1 then
pUnit:RegisterEvent('spell1_23216', 1, 1)
end
if choix_sorts_23216 == 2 then
pUnit:RegisterEvent('spell2_23216', 1, 1)
end
end

function mob23216_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23216', math.random(1500, 3000), 1)
end

function mob23216_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23216_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23216_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23216, 1, 'mob23216_Action')
RegisterUnitEvent(23216, 2, 'mob23216_Leave')
RegisterUnitEvent(23216, 3, 'mob23216_Kill')
RegisterUnitEvent(23216, 4, 'mob23216_Die')
